#include<stdio.h>
#include<iostream>
#include<string>
using namespace std;
int main()
{
	string str1;
	int i,j,count=0,max=0;
	cin>>str1;
		if(str1.empty()){
		cout<<"NULL";
		return 0;
	}
	for(i=0;i<=str1.size();i++){
		if(str1[i]>='0'&&str1[i]<='9') count++;
		else{
			if(count>max){
			  max=count;
			  j=i-max;
			}
			count=0;
		}
	}
	cout<<j<<" "<<max;
	return  0;
} 
